package com.example.demo.mapper;

import com.example.demo.model.OrderInfo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;
import java.util.Map;

@Mapper
public interface BuyerOrderMapper {
    List<OrderInfo> getBoughtOrders(@Param("buyerId") Integer buyerId, @Param("status") String status);

    List<OrderInfo> getBoughtOrdersComment(@Param("buyerId") Integer buyerId, @Param("status") String status);
    
    OrderInfo getOrderDetail(@Param("orderNo") String orderNo, @Param("buyerId") Integer buyerId);
    
    int confirmReceive(@Param("orderNo") String orderNo, @Param("buyerId") Integer buyerId);
    
    int cancelOrder(@Param("orderNo") String orderNo, @Param("buyerId") Integer buyerId, @Param("reason") String reason);
    
    int deleteOrder(@Param("orderNo") String orderNo, @Param("buyerId") Integer buyerId);
    
    String getCancelReason(@Param("orderNo") String orderNo, @Param("buyerId") Integer buyerId);
    
    int updateAddress(@Param("orderNo") String orderNo, @Param("buyerId") Integer buyerId, @Param("addressId") Integer addressId);
    
    Map<String, Object> getExpressInfo(@Param("orderNo") String orderNo, @Param("buyerId") Integer buyerId);


}